<template>
<view class="my-search-contianer" :style='{"background-color": background}' @click="changeHander()">
  <view class="my-search-box" :style="{'border-radius':redus+'px'}">
     <uni-icons type="search" size=18 class="my-icon"></uni-icons>
    <text class="placeholder">搜索</text>    
  </view>
</view>
</template>

<script>
  export default {
    name:"my-search",
    props:{
      background:{
        type:String,
        default: '#C00000'
      },
      redus:{
        type:Number,
        default:18
      }
    },
    data() {
      return {
         iconType: ['success']
      };
      },
      methods:{
        changeHander(){
          this.$emit('click')
      }
    }
  }
</script>

<style lang="scss">
.my-search-contianer{
  height: 50px;
  // background-color: #C00000;
  display: flex;
  padding: 0px 10px;
  align-items: center;
  .my-search-box{
    height: 36px;
    background-color: #F2F6FC;
    width: 100%;
    // border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    .placeholder{
      font-size: 18px;
      margin-left: 10px;
    }
  }
}
</style>
